package com.zmn.oms.services.impl.notifylog;

import com.zmn.common.utils.date.DateUtil;
import com.zmn.oms.model.entity.notifylog.OrderNotifyLog;
import com.zmn.oms.persistence.interfaces.notifylog.OrderNotifyLogDao;
import com.zmn.oms.services.interfaces.notifylog.OrderNotifyLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 类描述：订单推送日志
 *
 * @author liuying
 * @date 2019/07/09 17:29
 */
@Service
public class OrderNotifyLogServiceImpl implements OrderNotifyLogService {

    @Autowired
    OrderNotifyLogDao orderNotifyLogDao;

    @Override
    public List<OrderNotifyLog> listByOrderId(Long orderId) {
        return orderNotifyLogDao.listByOrderId(orderId);
    }

    @Override
    public int insert(OrderNotifyLog orderNotifyLog) {
        orderNotifyLog.setCreateTime(DateUtil.getNow());
        return orderNotifyLogDao.insert(orderNotifyLog);
    }
}
